﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.css" rel="stylesheet" />
    <title>Update</title>
</head>
<body>
    <div>
        @using (Html.BeginForm("updatestudent", "CMS_User", FormMethod.Post))
        {
            <table class="table-light">
                @foreach (var item in Model)
                {
                    <tr>
                        <td>编号：</td>
                        <td>
                            <input class="form-control-plaintext" type="text" value="@item.Uid" name="id" readonly="readonly" border="0" />
                        </td>

                    </tr>
                    <tr>
                        <td>姓名：</td>
                        <td>
                            <input type="text" value="@item.Uname" name="Uname" class="form-control" />
                        </td>

                    </tr>
                    <tr>
                        <td>密码：</td>
                        <td>
                            <input type="text" value="@item.upwd" name="upwd" class="form-control" />
                        </td>

                    </tr>
                    <tr>
                        <td>昵称：</td>
                        <td>
                            <input type="text" value="@item.nname" name="nname" class="form-control" />
                        </td>

                    </tr>
                    <tr>
                        <td>电话号码：</td>
                        <td>
                            <input type="text" value="@item.mobile" name="mobile" class="form-control" />
                        </td>
                    </tr>
                    <tr>
                        <td>头像</td>
                        <td>
                            <input class="form-control" type="file" id="file" value="@item.face" name="face" />
                        </td>
                    </tr>
                    <tr>
                        <td>头像</td>
                        <td>
                            <img src="~/images/@item.face" alt="" style="width:50px" />@item.face

                        </td>
                    </tr>
                    <tr>
                        <td>是否为管理员：</td>
                        <td>

                            <select id="Select1" name="Admin" class="form-select">
                                @*<option value="false">否</option>*@
                                @*<option value="True" >是</option>*@
                                @if (item.Admin == true)
                                {
                                    <option value="false">否</option>
                                    <option value="True" selected="selected">是</option>
                                }
                                @if (item.Admin == false)
                                {
                                    <option value="false" selected="selected">否</option>
                                    <option value="True">是</option>
                                }
                                @if (item.Admin != false && item.Admin != true)
                                {
                                    <option value="false">否</option>
                                    <option value="True">是</option>
                                }
                                @*<option value="false">否</option>*@
                                @*<option value="True">是</option>*@
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="submit" id="btn" value="修改" />
                        </td>
                    </tr>
                }

            </table>
        }

    </div>
</body>
</html>


